Results 1 to 3 of 3

Thread: When to Use level waittill prespawn and level waittill spawn

  1. #1

    Default When to Use level waittill prespawn and level waittill spawn

    Can someone please explain to me when to use these level waittill spawn and level waittill prespawn lines in scripts? What is their function and purpose? Is is just a way of waiting until a certain portion of the level is ready to load?

  2. #2

    Default

    It depends what you want to do.

    prespawn (think of it as level loading, no players yet, cvars setup etc)

    waittill spawn
    not just players, EVERYTHING, including ents and loops. yes loops are spawned.

    waittill playerspawn
    a very useful one I only just found....wait for the actual players to spawn...


    its easier to ask..."I want to do this, when should I do it"

  3. #3
    Developer Sor's Avatar
    Join Date
    Aug 2010
    Location
    The Medieval City of Bruges
    Posts
    747

    Default

    Interestingly, some entities can be spawned before level waittill spawn, for example script_origin entities, listeners and info_pathnode entities can be spawned even before level waittill prespawn.
    Their actual spawn could just be postponed till after prespawn, not sure... but I'm pretty sure this only applies to simple entities that don't need to be rendered and are notsolid by default.

    Just tried it, Elgan, pretty cool actually. But from what I saw, level waittill playerspawn waits until one player has entered the battle as opposed to level waittill postthink that waits until the first player makes a connection with the server.

    @own3mal: level waittill roundstart (RB, OBJ and TOW) will wait until there is one player on each team. In levels with rounds, there are round restarts which will skip everything before level waittill spawn (if I recall correctly)
    so keep in mind that variables, data etc... should set after spawn if you want them to use them in round 2, 3, 4....
    Last edited by Sor; April 24th, 2012 at 10:09 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •